﻿<phone:PhoneApplicationPage 
    x:Class="PhoneInfo.Page.LexunMap"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    shell:SystemTray.IsVisible="false" Style="{StaticResource TransitionPageStyle}"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    >
    
   <phone:PhoneApplicationPage.Resources>
        <shell:ApplicationBar x:Key="AppBar" IsVisible="True" ForegroundColor="#ffffffff" IsMenuEnabled="True" BackgroundColor="#ff31b2e7">
            <shell:ApplicationBarIconButton  IconUri="Icon/info/i_refresh.png"  Text="刷新" Click="ApplicationBarIconButton1_Click"/>
            <shell:ApplicationBarIconButton IconUri="Icon/info/i_share.png" Text="分享" Click="ApplicationBarIconButton2_Click"/>
        </shell:ApplicationBar>
        <shell:ApplicationBar x:Key="AppBar1" IsVisible="True" ForegroundColor="#ffffffff" IsMenuEnabled="True" BackgroundColor="#212121">
            <shell:ApplicationBarIconButton  IconUri="Icon/black/i_refresh.png"  Text="刷新" Click="ApplicationBarIconButton1_Click"/>
            <shell:ApplicationBarIconButton IconUri="Icon/black/i_share.png" Text="分享" Click="ApplicationBarIconButton2_Click"/>
        </shell:ApplicationBar>
        <Style x:Key="ButtonStyle1" TargetType="Button">
        	<Setter Property="Background" Value="Transparent"/>
        	<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
        	<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
        	<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
        	<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
        	<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
        	<Setter Property="Padding" Value="10,3,10,5"/>
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="Button">
        				<Grid Background="Transparent">
        					<VisualStateManager.VisualStateGroups>
        						<VisualStateGroup x:Name="CommonStates">
        							<VisualStateGroup.Transitions>
        								<VisualTransition GeneratedDuration="0" To="Pressed"/>
        							</VisualStateGroup.Transitions>
        							<VisualState x:Name="Normal"/>
        							<VisualState x:Name="MouseOver"/>
        							<VisualState x:Name="Pressed">
        								<Storyboard>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneBackgroundBrush}"/>
        									</ObjectAnimationUsingKeyFrames>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
        									</ObjectAnimationUsingKeyFrames>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneForegroundBrush}"/>
        									</ObjectAnimationUsingKeyFrames>
        								</Storyboard>
        							</VisualState>
        							<VisualState x:Name="Disabled">
        								<Storyboard>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
        									</ObjectAnimationUsingKeyFrames>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="ButtonBackground">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
        									</ObjectAnimationUsingKeyFrames>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
        										<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
        									</ObjectAnimationUsingKeyFrames>
        								</Storyboard>
        							</VisualState>
        						</VisualStateGroup>
        					</VisualStateManager.VisualStateGroups>
        					<Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Margin="{StaticResource PhoneTouchTargetOverhang}">
        						<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
        					</Border>
        				</Grid>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
       
   	</phone:PhoneApplicationPage.Resources>
    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="{Binding Source={StaticResource Theme}, Path=cuTheme.TextBrush}">
        <toolkit:PerformanceProgressBar   Foreground="Orange" x:Name="ProgBar" Visibility="Visible"  IsIndeterminate="True" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0" Grid.ColumnSpan="2"  Width="480" Canvas.ZIndex="1" />
        <phone:WebBrowser x:Name="web" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" Navigated="web_Navigated"
                             Navigating="web_Navigating"/>
    	<Popup x:Name="PopShard" Width="480" d:LayoutOverrides="VerticalMargin" >
    		<StackPanel>
    			<StackPanel>
    			  <Button BorderThickness="0" Style="{StaticResource ButtonStyle1}" Width="480" Height="300" Click="Button_Click"></Button>	
				</StackPanel>
				<StackPanel Orientation="Horizontal">
                    <Button  BorderThickness="0"  Style="{StaticResource ButtonStyle1}" Width="100" Height="200" Click="Button_Click"></Button>	
    		       <Grid Height="200" Width="280" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0" Background="{StaticResource PhoneAccentBrush}">
    		       	<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Background="{StaticResource PhoneAccentBrush}">
    		       		<Button Content="发短信" BorderThickness="0" Margin="80,0,0,0" Click="Button_Click_1" />
                            <Button Content="发邮件" BorderThickness="0" Margin="80,0,0,0"   Click="Button_Click_2"/>
    		       	</StackPanel>
    		       </Grid>
                    <Button  BorderThickness="0"  Style="{StaticResource ButtonStyle1}" Width="100" Height="200" Click="Button_Click"></Button>	
			   </StackPanel>
                <StackPanel>
                    <Button  BorderThickness="0"  Style="{StaticResource ButtonStyle1}" Width="480" Height="200" Click="Button_Click"></Button>	     
				</StackPanel>
			</StackPanel>	
		</Popup>
    </Grid>
    <!--演示 ApplicationBar 用法的示例代码-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
       
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
